package com.dykj.fireFighting.server.socialUnit.firemanger.mapper;


import com.dykj.fireFighting.api.socialUnit.firemanger.entity.HazardSourcesDevice;
import com.dykj.fireFighting.common.core.mapper.SuperMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @Description 危险源设备中间表
 * @Author aixiaolan
 * @Date  2021-07-06 08:42:43
 */
public interface HazardSourcesDeviceMapper extends SuperMapper<HazardSourcesDevice> {

    @Select("select device_id from hazard_sources_device where hazard_sources_id=#{hazardSourcesId} and type=#{type}" )
    List<String> getByHazardSourcesId(@Param("hazardSourcesId") String hazardSourcesId,@Param("type") Integer type);

    @Delete("DELETE FROM hazard_sources_device where hazard_sources_id=#{hazardSourcesId}")
    int delByHazardSourcesId(@Param("hazardSourcesId") String hazardSourcesId);
	
}
